1
0
mirror of https://github.com/dhil/phd-dissertation synced 2026-03-13 11:08:25 +00:00

Start subsection on colon translations.

This commit is contained in:
2020-08-26 15:42:01 +01:00
parent 74029910ff
commit ef3ff74249

View File

@@ -1914,6 +1914,11 @@ getting stuck on an unhandled operation.
\subsection{Syntax and static semantics} \subsection{Syntax and static semantics}
\subsection{Dynamic semantics} \subsection{Dynamic semantics}
\section{Flavours of control}
\subsection{Undelimited control}
\subsection{Delimited control}
\subsection{Composable control}
\chapter{N-ary handlers} \chapter{N-ary handlers}
\label{ch:multi-handlers} \label{ch:multi-handlers}
@@ -2282,6 +2287,8 @@ The following minimal example readily illustrates both issues.
&\reducesto& \Record{} \\ &\reducesto& \Record{} \\
\end{equations} \end{equations}
% %
\dhil{Mark the second reduction, so that it can be referred back to}
%
The second and third reductions simulate handling $\Return\;\Record{}$ The second and third reductions simulate handling $\Return\;\Record{}$
at the top level. The second reduction partially applies the curried at the top level. The second reduction partially applies the curried
function term $\lambda x.\lambda h.x$ to $\Record{}$, which must function term $\lambda x.\lambda h.x$ to $\Record{}$, which must
@@ -2394,12 +2401,12 @@ continuations causes the CPS translation to produce `large'
application terms, e.g. the translation rule for effect forwarding application terms, e.g. the translation rule for effect forwarding
produces three-argument application term. produces three-argument application term.
% %
To rectify this problem we can adapt the standard To rectify this problem we can adapt the technique of
technique of \citet{MaterzokB12} to uncurry our CPS \citet{MaterzokB12} to uncurry our CPS translation. Uncurrying
translation. Uncurrying necessitates a change of representation for necessitates a change of representation for continuations: a
continuations: a continuation is now an alternating list of pure continuation is now an alternating list of pure continuation functions
continuation functions and effect continuation functions. Thus, we and effect continuation functions. Thus, we move to an explicit
move to an explicit representation of the runtime handler stack. representation of the runtime handler stack.
% %
The change of continuation representation means the CPS translation The change of continuation representation means the CPS translation
for effect handlers is no longer a conservative extension. The for effect handlers is no longer a conservative extension. The
@@ -2682,7 +2689,6 @@ to a static value $\sV$ is equal to substituting $\sV$ for $\sks$ in
$\sM$. The second equation provides a means for applying a static $\sM$. The second equation provides a means for applying a static
lambda abstraction to a static list component-wise. lambda abstraction to a static list component-wise.
% %
\dhil{What about $\eta$-equivalence?}
Reflected static values are reified as dynamic language values Reflected static values are reified as dynamic language values
$\reify \sV$ by induction on their structure. $\reify \sV$ by induction on their structure.
@@ -2931,6 +2937,30 @@ If $M \reducesto N$ then $\pcps{M} \reducesto^+ \areducesto^* \pcps{N}$.
% TODO\dots % TODO\dots
% \end{proof} % \end{proof}
% %
\section{Related work}
\label{sec:cps-related-work}
\subsection{Plotkin's colon translation}
\citeauthor{Plotkin75}'s original CPS translation yielded static
administrative redexes. Clearly this translation is undesirable from
a practical point of view as it generates an additional and completely
artefactual overhead. From a theoretical point of view such a CPS
translation is also undesirable as the presence of administrative
redexes makes proof of correctness considerably more involved.
%
\citeauthor{Plotkin75}'s simulation theorem shows a correspondence
between reductions in a given source program and its transformed
program. To establish this correspondence in the presence of
administrative redexes, \citeauthor{Plotkin75} introduced the
so-called ``colon''-translation\dots
% between the sourceTo prove the correctness of his CPS translation, \citet{Plotkin75}
% made use of a so-called ``colon''-translation to bypass administrative reductions
\subsection{Iterated CPS translations}
\chapter{Abstract machine semantics} \chapter{Abstract machine semantics}
\part{Expressiveness} \part{Expressiveness}