mirror of
https://github.com/dhil/phd-dissertation
synced 2026-03-13 11:08:25 +00:00
Compare commits
2 Commits
f69c94d63b
...
6102f9ad90
| Author | SHA1 | Date | |
|---|---|---|---|
| 6102f9ad90 | |||
| 592b2f4fdf |
76
macros.tex
Normal file
76
macros.tex
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
%%
|
||||||
|
%% Calculi names.
|
||||||
|
%%
|
||||||
|
\newcommand{\Links}{Links\xspace}
|
||||||
|
\newcommand{\BCalc}{\ensuremath{\lambda_{\mathsf{b}}}\xspace}
|
||||||
|
\newcommand{\BCalcRec}{\ensuremath{\lambda_{\mathsf{b}+\mathsf{rec}}}\xspace}
|
||||||
|
|
||||||
|
%%
|
||||||
|
%% Calculi terms and types type-setting.
|
||||||
|
%%
|
||||||
|
\newcommand{\slab}[1]{\textrm{#1}}
|
||||||
|
\newcommand{\semlab}[1]{\text{\scshape{S-#1}}}
|
||||||
|
\newcommand{\tylab}[1]{\text{\scshape{T-#1}}}
|
||||||
|
\newcommand{\mlab}[1]{\text{\scshape{M-#1}}}
|
||||||
|
\newcommand{\siglab}[1]{\text{\scshape{Sig-#1}}}
|
||||||
|
\newcommand{\klab}[1]{#1}
|
||||||
|
\newcommand{\revto}{\ensuremath{\leftarrow}}
|
||||||
|
|
||||||
|
\newcommand{\dec}[1]{\mathsf{#1}}
|
||||||
|
\newcommand{\keyw}[1]{\mathbf{#1}}
|
||||||
|
\newcommand{\Handle}{\keyw{handle}}
|
||||||
|
\newcommand{\ShallowHandle}{\ensuremath{\keyw{handle}^\dagger}}
|
||||||
|
\newcommand{\With}{\keyw{with}}
|
||||||
|
\newcommand{\Let}{\keyw{let}}
|
||||||
|
\newcommand{\Rec}{\keyw{rec}}
|
||||||
|
\newcommand{\In}{\keyw{in}}
|
||||||
|
\newcommand{\Do}{\keyw{do}}
|
||||||
|
\newcommand{\Return}{\keyw{return}}
|
||||||
|
\newcommand{\Val}{\keyw{val}}
|
||||||
|
\newcommand{\Case}{\keyw{case}}
|
||||||
|
\newcommand{\If}{\keyw{if}}
|
||||||
|
\newcommand{\Then}{\keyw{then}}
|
||||||
|
\newcommand{\Else}{\keyw{else}}
|
||||||
|
\newcommand{\Absurd}{\keyw{absurd}}
|
||||||
|
\newcommand{\Record}[1]{\ensuremath{\langle #1 \rangle}}
|
||||||
|
\newcommand{\Unit}{\Record{}}
|
||||||
|
\newcommand{\Inl}{\keyw{inl}}
|
||||||
|
\newcommand{\Inr}{\keyw{inr}}
|
||||||
|
\newcommand{\Thunk}{\lambda \Unit.}
|
||||||
|
|
||||||
|
\newcommand{\Pre}[1]{\mathsf{Pre}(#1)}
|
||||||
|
\newcommand{\Abs}{\mathsf{Abs}}
|
||||||
|
\newcommand{\Presence}{\mathsf{Presence}}
|
||||||
|
\newcommand{\Row}{\mathsf{Row}}
|
||||||
|
\newcommand{\Type}{\mathsf{Type}}
|
||||||
|
\newcommand{\Ground}{\mathsf{ground}}
|
||||||
|
|
||||||
|
\newcommand{\Comp}{\mathsf{Comp}}
|
||||||
|
\newcommand{\Effect}{\mathsf{Effect}}
|
||||||
|
\newcommand{\Handler}{\mathsf{Handler}}
|
||||||
|
|
||||||
|
\newcommand{\One}{1}
|
||||||
|
\newcommand{\Int}{\mathsf{Int}}
|
||||||
|
\newcommand{\Bool}{\mathsf{Bool}}
|
||||||
|
\newcommand{\List}{\mathsf{List}}
|
||||||
|
\newcommand{\Nat}{\mathsf{Nat}}
|
||||||
|
\newcommand{\Choose}{\dec{Choose}}
|
||||||
|
\newcommand{\Count}{\dec{count}}
|
||||||
|
\newcommand{\GenericSearch}{\dec{genericSearch}}
|
||||||
|
\newcommand{\Predicate}{\dec{Predicate}}
|
||||||
|
\newcommand{\Point}{\dec{Point}}
|
||||||
|
\newcommand{\Branch}{\dec{Branch}}
|
||||||
|
\newcommand{\Get}{\dec{Get}}
|
||||||
|
\newcommand{\Put}{\dec{Put}}
|
||||||
|
\newcommand{\Zero}{\dec{Zero}}
|
||||||
|
\newcommand{\Fail}{\dec{Fail}}
|
||||||
|
|
||||||
|
\newcommand{\True}{\mathsf{true}}
|
||||||
|
\newcommand{\False}{\mathsf{false}}
|
||||||
|
|
||||||
|
%% Handler projections.
|
||||||
|
\newcommand{\hret}{H^{\mathrm{val}}}
|
||||||
|
\newcommand{\hval}{\hret}
|
||||||
|
\newcommand{\hops}{H^{\mathrm{ops}}}
|
||||||
|
%\newcommand{\hex}{H^{\mathrm{ex}}}
|
||||||
|
\newcommand{\hell}{H^{\ell}}
|
||||||
93
thesis.tex
93
thesis.tex
@@ -1,5 +1,5 @@
|
|||||||
%% 12pt font size, PhD thesis, LFCS, print twosided, new chapters on right page
|
%% 12pt font size, PhD thesis, LFCS, print twosided, new chapters on right page
|
||||||
\documentclass[11pt,phd,lfcs,twoside,openright,logo,leftchapter,normalheadings]{infthesis}
|
\documentclass[12pt,phd,lfcs,twoside,openright,logo,leftchapter,normalheadings]{infthesis}
|
||||||
\shieldtype{0}
|
\shieldtype{0}
|
||||||
|
|
||||||
%% Packages
|
%% Packages
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
\usepackage[british]{babel} % British English
|
\usepackage[british]{babel} % British English
|
||||||
\usepackage[breaklinks]{hyperref} % Interactive PDF
|
\usepackage[breaklinks]{hyperref} % Interactive PDF
|
||||||
\usepackage{url}
|
\usepackage{url}
|
||||||
|
\usepackage[sort&compress,square,numbers]{natbib} % Bibliography
|
||||||
\usepackage{breakurl}
|
\usepackage{breakurl}
|
||||||
\usepackage{amsmath} % Mathematics library
|
\usepackage{amsmath} % Mathematics library
|
||||||
\usepackage{amssymb} % Provides math fonts
|
\usepackage{amssymb} % Provides math fonts
|
||||||
@@ -29,6 +30,7 @@
|
|||||||
shrink=10]{microtype}
|
shrink=10]{microtype}
|
||||||
\usepackage{enumerate} % Customise enumerate-environments
|
\usepackage{enumerate} % Customise enumerate-environments
|
||||||
\usepackage{xcolor} % Colours
|
\usepackage{xcolor} % Colours
|
||||||
|
\usepackage{xspace} % Smart spacing in commands.
|
||||||
\usepackage{tikz}
|
\usepackage{tikz}
|
||||||
\usetikzlibrary{fit,calc,trees,positioning,arrows,chains,shapes.geometric,%
|
\usetikzlibrary{fit,calc,trees,positioning,arrows,chains,shapes.geometric,%
|
||||||
decorations.pathreplacing,decorations.pathmorphing,shapes,%
|
decorations.pathreplacing,decorations.pathmorphing,shapes,%
|
||||||
@@ -46,6 +48,11 @@
|
|||||||
\textquotedblleft={ ,150}, % left quotation mark, space from right
|
\textquotedblleft={ ,150}, % left quotation mark, space from right
|
||||||
\textquotedblright={150, }} % right quotation mark, space from left
|
\textquotedblright={150, }} % right quotation mark, space from left
|
||||||
|
|
||||||
|
%%
|
||||||
|
%% Load macros.
|
||||||
|
%%
|
||||||
|
\input{macros}
|
||||||
|
|
||||||
%% Information about the title, etc.
|
%% Information about the title, etc.
|
||||||
% \title{Higher-Order Theories of Handlers for Algebraic Effects}
|
% \title{Higher-Order Theories of Handlers for Algebraic Effects}
|
||||||
% \title{Handlers for Algebraic Effects: Applications, Compilation, and Expressiveness}
|
% \title{Handlers for Algebraic Effects: Applications, Compilation, and Expressiveness}
|
||||||
@@ -159,89 +166,99 @@ Explain conventions\dots
|
|||||||
\part{Background}
|
\part{Background}
|
||||||
\label{p:background}
|
\label{p:background}
|
||||||
|
|
||||||
\chapter{The State of Effectful Programming}
|
\chapter{The state of effectful programming}
|
||||||
\label{ch:related-work}
|
\label{ch:related-work}
|
||||||
|
|
||||||
\section{Type and Effect Systems}
|
\section{Type and effect systems}
|
||||||
\section{Monadic Programming}
|
\section{Monadic programming}
|
||||||
|
|
||||||
\chapter{Continuations}
|
\chapter{Continuations}
|
||||||
\label{ch:continuations}
|
\label{ch:continuations}
|
||||||
|
|
||||||
\section{Zoo of Control Operators}
|
\section{Zoo of control operators}
|
||||||
Describe how effect handlers fit amongst shift/reset, prompt/control,
|
Describe how effect handlers fit amongst shift/reset, prompt/control,
|
||||||
callcc, J, catchcont, etc.
|
callcc, J, catchcont, etc.
|
||||||
|
|
||||||
\section{Implementation Strategies}
|
\section{Implementation strategies}
|
||||||
|
|
||||||
|
|
||||||
\part{Design}
|
\part{Design}
|
||||||
|
|
||||||
\chapter{A ML-like Base Language}
|
\chapter{A ML-flavoured programming language}
|
||||||
\section{Syntax and Static Semantics}
|
\label{ch:base-language}
|
||||||
\section{Type Inference}
|
|
||||||
\section{Dynamic Semantics}
|
|
||||||
|
|
||||||
\chapter{Unary Handlers}
|
In this chapter we introduce a core calculus, $\BCalc$, which we shall
|
||||||
|
later use as the basis for exploration of design considerations for
|
||||||
|
effect handlers. This calculus distils the `functional' essence of the
|
||||||
|
ML-flavoured multi-tier web-programming language
|
||||||
|
\Links~\cite{CooperLWY06}. As such $\BCalc$ may be regarded as a
|
||||||
|
faithful model of a prototypical and practical functional programming
|
||||||
|
language.
|
||||||
|
|
||||||
|
\section{Syntax and static semantics}
|
||||||
|
\section{Type inference}
|
||||||
|
\section{Dynamic semantics}
|
||||||
|
|
||||||
|
\chapter{Unary handlers}
|
||||||
\label{ch:deep-handlers}
|
\label{ch:deep-handlers}
|
||||||
|
|
||||||
\section{Deep Handlers}
|
\section{Deep handlers}
|
||||||
\subsection{Syntax and Static Semantics}
|
\subsection{Syntax and static semantics}
|
||||||
\subsection{Effect inference}
|
\subsection{Effect inference}
|
||||||
\subsection{Dynamic Semantics}
|
\subsection{Dynamic semantics}
|
||||||
|
|
||||||
\section{Parameterised Handlers}
|
\section{Parameterised handlers}
|
||||||
|
|
||||||
\section{Shallow Handlers}
|
\section{Shallow handlers}
|
||||||
\label{ch:shallow-handlers}
|
\label{ch:shallow-handlers}
|
||||||
|
|
||||||
\subsection{Syntax and Static Semantics}
|
\subsection{Syntax and static semantics}
|
||||||
\subsection{Dynamic Semantics}
|
\subsection{Dynamic semantics}
|
||||||
|
|
||||||
\chapter{N-ary Handlers}
|
\chapter{N-ary handlers}
|
||||||
\label{ch:multi-handlers}
|
\label{ch:multi-handlers}
|
||||||
|
|
||||||
% \section{Syntax and Static Semantics}
|
% \section{Syntax and Static Semantics}
|
||||||
% \section{Dynamic Semantics}
|
% \section{Dynamic Semantics}
|
||||||
\section{Unifying Deep and Shallow Handlers}
|
\section{Unifying deep and shallow handlers}
|
||||||
|
|
||||||
\part{Implementation}
|
\part{Implementation}
|
||||||
|
|
||||||
\chapter{Continuation Passing Styles}
|
\chapter{Continuation passing styles}
|
||||||
\chapter{Abstract Machine Semantics}
|
\chapter{Abstract machine semantics}
|
||||||
|
|
||||||
\part{Expressiveness}
|
\part{Expressiveness}
|
||||||
\chapter{Computability, Complexity, and Expressivness}
|
\chapter{Computability, complexity, and expressivness}
|
||||||
\label{ch:expressiveness}
|
\label{ch:expressiveness}
|
||||||
\section{Notions of Expressiveness}
|
\section{Notions of expressiveness}
|
||||||
Felleisen's macro-expressiveness, Longley's type-respecting
|
Felleisen's macro-expressiveness, Longley's type-respecting
|
||||||
expressiveness, Kammar's typability-preserving expressiveness.
|
expressiveness, Kammar's typability-preserving expressiveness.
|
||||||
|
|
||||||
\section{Interdefinability of Deep and Shallow Handlers}
|
\section{Interdefinability of deep and shallow Handlers}
|
||||||
\section{Encoding Parameterised Handlers}
|
\section{Encoding parameterised handlers}
|
||||||
|
|
||||||
\chapter{The Asymptotic Power of Control}
|
\chapter{The asymptotic power of control}
|
||||||
\label{ch:handlers-efficiency}
|
\label{ch:handlers-efficiency}
|
||||||
Describe the methodology\dots
|
Describe the methodology\dots
|
||||||
\section{Generic Search}
|
\section{Generic search}
|
||||||
\section{Calculi}
|
\section{Calculi}
|
||||||
\subsection{Base calculus}
|
\subsection{Base calculus}
|
||||||
\subsection{Handler calculus}
|
\subsection{Handler calculus}
|
||||||
\section{A Practical Model of Computation}
|
\section{A practical model of computation}
|
||||||
\subsection{Syntax}
|
\subsection{Syntax}
|
||||||
\subsection{Semantics}
|
\subsection{Semantics}
|
||||||
\subsection{Realisability}
|
\subsection{Realisability}
|
||||||
\section{Points, Predicates, and their Models}
|
\section{Points, predicates, and their models}
|
||||||
\section{Efficient Generic Search with Effect Handlers}
|
\section{Efficient generic search with effect handlers}
|
||||||
\subsection{Space complexity}
|
\subsection{Space complexity}
|
||||||
\section{Best-case Complexity of Generic Search without Control}
|
\section{Best-case complexity of generic search without control}
|
||||||
\subsection{No shortcuts}
|
\subsection{No shortcuts}
|
||||||
\subsection{No sharing}
|
\subsection{No sharing}
|
||||||
|
|
||||||
\chapter{Robustness of the Asymptotic Power of Control}
|
\chapter{Robustness of the asymptotic power of control}
|
||||||
\section{Mutable State}
|
\section{Mutable state}
|
||||||
\section{Exception Handling}
|
\section{Exception handling}
|
||||||
\section{Effect System}
|
\section{Effect system}
|
||||||
|
|
||||||
\part{Conclusions}
|
\part{Conclusions}
|
||||||
|
|
||||||
@@ -261,9 +278,9 @@ Some profound conclusions\dots
|
|||||||
%% the next line.
|
%% the next line.
|
||||||
%\nocite{*}
|
%\nocite{*}
|
||||||
\singlespace
|
\singlespace
|
||||||
\nocite{*}
|
%\nocite{*}
|
||||||
%\printbibliography[heading=bibintoc]
|
%\printbibliography[heading=bibintoc]
|
||||||
\bibliographystyle{unsrt}
|
\bibliographystyle{plainnat}
|
||||||
\bibliography{\jobname}
|
\bibliography{\jobname}
|
||||||
|
|
||||||
%% ... that's all, folks!
|
%% ... that's all, folks!
|
||||||
|
|||||||
Reference in New Issue
Block a user