mirror of
https://github.com/dhil/phd-dissertation
synced 2026-03-13 02:58:26 +00:00
Compare commits
2 Commits
427a24e7f8
...
ea3c6a7345
| Author | SHA1 | Date | |
|---|---|---|---|
| ea3c6a7345 | |||
| 672d67fc72 |
73
thesis.tex
73
thesis.tex
@@ -138,13 +138,18 @@
|
||||
% operator \emph{async-await} lets the programmer run multiple
|
||||
% distinct continuations asynchronously and await their results.
|
||||
%
|
||||
First-class control operators provide an expressive and efficient
|
||||
means for programmers to implement their own control idioms as
|
||||
shareable libraries.
|
||||
First-class control operators provide programmers with an expressive
|
||||
and efficient means for manipulating control through reification of
|
||||
the current control state as a first-class object, enabling
|
||||
programmers to implement their own control idioms as shareable
|
||||
libraries.
|
||||
%
|
||||
Effect handlers provide a structured interface for programming with
|
||||
first-class control by separating control reifying operations from
|
||||
their handling.
|
||||
Effect handlers provide a particularly structured approach to
|
||||
programming with first-class control by separating control reifying
|
||||
operations from their handling.
|
||||
|
||||
In this thesis I develop operational foundations for programming and
|
||||
implementing effect handlers.
|
||||
|
||||
The first strand develops the core calculus of a programming
|
||||
language with a \emph{structural} notion of effects, as opposed to
|
||||
@@ -153,13 +158,17 @@
|
||||
By making crucial use of \emph{row polymorphism} to build and track
|
||||
effect signatures.
|
||||
|
||||
The second strand studies foundational implementation techniques for
|
||||
deep, shallow, and parameterised effect handlers.
|
||||
The second strand studies \emph{continuation passing style} and
|
||||
\emph{abstract machine semantics}, which are foundational techniques
|
||||
that admit a unified basis for implementing deep, shallow, and
|
||||
parameterised effect handlers in the same environment.
|
||||
%
|
||||
Starting from a CPS translation basic Eventually leading to the
|
||||
notion of \emph{generalised continuation}.
|
||||
|
||||
The third strand explores the expressive power of effect handlers.
|
||||
|
||||
In this thesis I develop foundational techniques for programming and
|
||||
implementing effect handlers.
|
||||
The third strand investigates the expressive power of effect
|
||||
handlers.
|
||||
%
|
||||
}
|
||||
|
||||
%% Now we start with the actual document.
|
||||
@@ -4257,36 +4266,42 @@ The term `pure' is heavily overloaded in the programming literature.
|
||||
\label{ch:unary-handlers}
|
||||
%
|
||||
Programming with effect handlers is a dichotomy of \emph{performing}
|
||||
and \emph{handling} of effectful operations -- or alternatively a
|
||||
and \emph{handling} of effectful operations --- or alternatively a
|
||||
dichotomy of \emph{constructing} and \emph{deconstructing} effects. An
|
||||
operation is a constructor of an effect. By itself an operation has no
|
||||
predefined semantics. A handler deconstructs effects by
|
||||
pattern-matching on their operations. By matching on a particular
|
||||
operation, a handler instantiates the said operation with a particular
|
||||
predefined semantics. A handler deconstructs an effect by
|
||||
pattern-matching on its operations. By matching on a particular
|
||||
operation, a handler instantiates the operation with a particular
|
||||
semantics of its own choosing. The key ingredient to make this work in
|
||||
practice is \emph{delimited control}. Performing an operation reifies
|
||||
the remainder of the computation up to the nearest enclosing handler
|
||||
of the said operation as a continuation. The continuation is provided
|
||||
to the programmer via the handler, and it may be manipulated like any
|
||||
other first-class value.
|
||||
of the operation as a continuation. This continuation is exposed to
|
||||
the programmer via the handler as a first-class value, and thus, it
|
||||
may be invoked, discarded, or stored for later use at the discretion
|
||||
of the programmer.
|
||||
|
||||
Effect handlers provide a structured interface for programming with
|
||||
delimited continuations. They are structured in the sense that an
|
||||
invocation site of an operation is decoupled from the use site of its
|
||||
continuation. A continuation is exposed in the corresponding operation
|
||||
cases inside the handler of its operation of provenance.
|
||||
Effect handlers provide a structured and modular interface for
|
||||
programming with delimited control. They are structured in the sense
|
||||
that the invocation site of an operation is decoupled from the use
|
||||
site of its continuation. A handler consists of a collection of
|
||||
operation clauses, one for each operation it handles. Effect handlers
|
||||
are modular as a handler will only capture and expose continuations
|
||||
for operations that it handles, other operation invocations pass
|
||||
seamlessly through the handler such that the operation can be handled
|
||||
by another suitable handler. This allows modular construction of
|
||||
programs, where multiple handlers can be composed to interpret all
|
||||
effects of the whole program.
|
||||
|
||||
I will make a slight change of terminology to disambiguate
|
||||
programmatic continuations, i.e. continuations exposed to the
|
||||
programmer, from continuations in continuation passing style
|
||||
(Chapter~\ref{ch:cps}) and machine continuations
|
||||
From here onwards I will make a slight change of terminology to
|
||||
disambiguate programmatic continuations, i.e. continuations exposed to
|
||||
the programmer, from continuations in continuation passing style
|
||||
(Chapter~\ref{ch:cps}) and continuations in abstract machines
|
||||
(Chapter~\ref{ch:abstract-machine}). In the remainder of this
|
||||
dissertation I refer to programmatic continuations as `resumptions',
|
||||
and reserve the term `continuation' for continuations concerning the
|
||||
implementation details.
|
||||
|
||||
|
||||
|
||||
% In this chapter we study various flavours of unary effect
|
||||
% handlers~\cite{PlotkinP13}, that is handlers of a single
|
||||
% computation. Concretely, we shall study four variations of effect
|
||||
|
||||
Reference in New Issue
Block a user