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

Compare commits

..

63 Commits

Author SHA1 Message Date
Daniel Hillerström
c2d79e1d06 Fix bibliography: add missing year 2025-12-18 14:08:13 +00:00
Daniel Hillerström
47410e4d14 Fix typo in -ctrl+ rule. The delimiter is part of the reified context. 2025-12-18 14:07:59 +00:00
81a4ecec0b UNIX tutorial 2024 2024-10-11 15:45:34 +02:00
cafa8b1ba2 Merge branch 'master' of github.com:dhil/phd-dissertation 2024-02-26 09:51:21 +01:00
2e61275a5b Fix typo; fix sentence structure.
This commit fixes a typo in the type signature of `init` (thanks to
Ramsay Carslaw for spotting it). This commit also structures the last
sentence of Section 2.7 to read slightly better.
2024-02-26 09:50:56 +01:00
e90ba67a4b Update timeline 2023-09-14 09:22:21 +02:00
6aee80a71b Fix typo 2023-09-14 09:14:29 +02:00
aea67c86b4 Fix typo 2023-04-12 14:55:37 +02:00
Daniel Hillerström
5ede30903f Fix typo 2023-02-14 10:59:29 +01:00
Daniel Hillerström
03b7c5b548 Fix typo. Slightly reword an awkward sentence. 2023-02-10 14:31:37 +01:00
7535fe7ecc Fix typos in handler typing rules in the appendix 2023-01-09 17:00:38 +00:00
72b54ad278 Add missing space in 'Evaluationcontexts' in Figure 3.5 2023-01-09 14:45:32 +00:00
01e707822f Fix typo in T-Let Figure 3.4 2023-01-09 14:42:09 +00:00
2cecb13d34 Update all slides 2022-11-17 15:05:18 +00:00
ed634fcaa3 Update slides 2022-11-17 11:10:29 +00:00
c60dc80fde Update slides 2022-11-16 23:42:00 +00:00
e86597f4e4 Draft lecture notes 2022-11-16 22:02:05 +00:00
2b7b1df8db Merge branch 'master' of github.com:dhil/phd-dissertation 2022-11-15 18:01:32 +00:00
20f44ad547 Fix typo 2022-11-15 18:01:26 +00:00
101ac96aa2 NU PRL slides 2022-11-02 15:45:00 +00:00
e6182105de Merge branch 'master' of github.com:dhil/phd-dissertation 2022-10-12 23:56:05 +01:00
63fe9a738a Prepare slides for Huawei Research Centre Zurich seminar 2022-10-12 23:55:57 +01:00
3a9394baf8 Fix a minor typo 2022-07-01 01:19:43 +01:00
6193214890 Update slides 2022-05-26 18:27:32 +01:00
ffe6ebd0b9 Update MSR 2022 slides 2022-05-25 22:29:14 +01:00
01a8a3d581 Draft MSR talk 2022-05-25 22:24:31 +01:00
008e80ea67 Link to thesis.
Update README to reflect the structure of the revised thesis.
2022-03-26 00:18:14 +00:00
3276537ab1 Tweak acknowledgements 2022-03-23 14:56:41 +00:00
20551152b3 Minor tweaks and typo fixes. 2022-03-21 14:12:59 +00:00
8679803146 Fix typo 2022-03-18 14:49:58 +00:00
d7bd881a00 Update latest draft 2021-12-22 16:55:21 +00:00
f5685fe70d Chapter 8 2021-12-22 16:48:14 +00:00
7f3503153f Minor fixes 2021-12-22 16:27:14 +00:00
40c6505ae2 Simplify 2021-12-22 16:15:16 +00:00
b897751a38 Note on reduction relation 2021-12-22 16:13:22 +00:00
3e1bbf3206 Fix todo 2021-12-22 16:10:51 +00:00
40948507e9 CPS outline 2021-12-22 16:08:08 +00:00
2a800f07e2 WIP 2021-12-22 15:58:26 +00:00
d3921f24e3 WIP 2021-12-22 14:23:57 +00:00
7063acb4e7 Related work 2021-12-21 16:14:59 +00:00
c9ff1d9af8 Chapter 3 2021-12-21 16:05:12 +00:00
fff15c9c83 Section 2.6 and 2.7 2021-12-20 23:29:27 +00:00
a24a33dcf8 Section 2.5 2021-12-20 16:08:32 +00:00
6c128a1181 Section 2.4 2021-12-20 13:37:07 +00:00
98784c59ab Section 2.3 2021-12-17 17:57:31 +00:00
6492391ed4 Section 2.2 2021-12-17 17:23:01 +00:00
cea34c85e1 Section 2.1 2021-12-17 16:42:02 +00:00
40b1144d9b Chapter 2 outline, relation to prior work, and terminology. 2021-12-17 01:29:57 +00:00
3067bfb939 fix chapter 2 intro 2021-12-13 22:55:52 +00:00
83b5f7db99 Start implementing the corrections. 2021-11-24 15:20:50 +00:00
981b0d48f8 Update README with viva date. 2021-08-13 12:07:16 +01:00
ee8a4ab2dd Fix a couple of typos 2021-08-13 11:47:23 +01:00
3fda920eae Minor improvement 2021-08-13 11:35:08 +01:00
0b198e7a25 Add paper references 2021-08-12 23:01:29 +01:00
740413ed1b Viva slides 2021-08-12 22:37:01 +01:00
7ed7a44d61 Package the draft as an archive 2021-06-07 13:31:51 +01:00
350d741204 List appendices 2021-06-07 12:35:42 +01:00
f8697be4c7 Remark that the final revision will be made available. 2021-06-07 12:28:06 +01:00
f9b8234221 Link to examiners 2021-06-07 12:26:36 +01:00
67598cee1e Dissertation overview 2021-06-07 12:22:52 +01:00
113b7c4620 Update build instructions 2021-06-07 12:13:26 +01:00
c52edb51f6 Make the latest draft revision available. 2021-06-07 12:10:00 +01:00
a4b802e4e0 Draft compilation 2021-06-07 12:03:47 +01:00
12 changed files with 14759 additions and 7346 deletions

View File

@@ -3,8 +3,10 @@ CFLAGS=-interaction=nonstopmode -halt-on-error -file-line-error
BIBC=bibtex
PAPER=thesis
BIBLIO=$(PAPER)
LATEST_COMMIT=$(shell git log --format="%h" -n 1)
all: $(PAPER).pdf
draft: $(PAPER).pdf-draft
$(PAPER).aux: $(PAPER).tex
$(TEXC) $(CFLAGS) $(PAPER)
@@ -16,6 +18,11 @@ $(PAPER).pdf: $(PAPER).aux $(BIBLIO).bbl
$(TEXC) $(CFLAGS) $(PAPER)
$(TEXC) $(CFLAGS) $(PAPER)
$(PAPER).pdf-draft: CFLAGS:=$(CFLAGS) "\def\DRAFT{$(LATEST_COMMIT)}\input{$(PAPER)}"
$(PAPER).pdf-draft: all
mv $(PAPER).pdf $(PAPER)-draft.pdf
tar cf thesis-draft.tar.gz $(PAPER)-draft.pdf
clean:
rm -f *.log *.aux *.toc *.out
rm -f *.bbl *.blg *.fls *.xml

120
README.md
View File

@@ -1,6 +1,120 @@
# PhD dissertation on foundations for programming and implementing effect handlers
# Foundations for programming and implementing effect handlers
A copy of my dissertation can be [downloaded via my
website](https://dhil.net/research/papers/thesis.pdf).
----
Submitted on May 30, 2021. Examined on August 13, 2021.
The board of examiners were
* [Andrew Kennedy](https://github.com/andrewjkennedy) (Facebook London)
* [Edwin Brady](https://www.type-driven.org.uk/edwinb/) (University of St Andrews)
* [Ohad Kammar](http://denotational.co.uk/) (The University of Edinburgh)
* [Stephen Gilmore](https://homepages.inf.ed.ac.uk/stg/) (The University of Edinburgh)
## Thesis structure
The dissertation is structured as follows.
### Introduction
* Chapter 1 puts forth an argument for why effect handlers
matter. Following this argument it provides a basic introduction to
several different approaches to effectful programming through the
lens of the state effect. In addition, it also declares the scope
and contributions of the dissertation, and discusses some related
work.
### Programming
* Chapter 2 illustrates effect handler oriented programming by
example by implementing a small operating system dubbed Tiny UNIX,
which captures some essential traits of Ritchie and Thompson's
UNIX. The implementation starts with a basic notion of file i/o,
and then, it evolves into a feature-rich operating system with full
file i/o, multiple user environments, multi-tasking, and more, by
composing ever more effect handlers.
* Chapter 3 introduces a polymorphic fine-grain call-by-value core
calculus, λ<sub>b</sub>, which makes key use of Rémy-style row
polymorphism to implement polymorphic variants, structural records,
and a structural effect system. The calculus distils the essence of
the core of the Links programming language. The chapter also
presents three extensions of λ<sub>b</sub>, which are λ<sub>h</sub>
that adds deep handlers, λ<sup>†</sup> that adds shallow handlers,
and λ<sup>‡</sup> that adds parameterised handlers.
### Implementation
* Chapter 4 develops a higher-order continuation passing style
translation for effect handlers through a series of step-wise
refinements of an initial standard continuation passing style
translation for λ<sub>b</sub>. Each refinement slightly modifies
the notion of continuation employed by the translation. The
development ultimately leads to the key invention of generalised
continuation, which is used to give a continuation passing style
semantics to deep, shallow, and parameterised handlers.
* Chapter 5 demonstrates an application of generalised continuations
to abstract machine as we plug generalised continuations into
Felleisen and Friedman's CEK machine to obtain an adequate abstract
runtime with simultaneous support for deep, shallow, and
parameterised handlers.
### Expressiveness
* Chapter 6 shows that deep, shallow, and parameterised notions of
handlers can simulate one another up to specific notions of
administrative reduction.
* Chapter 7 studies the fundamental efficiency of effect handlers. In
this chapter, we show that effect handlers enable an asymptotic
improvement in runtime complexity for a certain class of
functions. Specifically, we consider the *generic count* problem
using a pure PCF-like base language λ<sub>b</sub><sup>→</sup> (a
simply typed variation of λ<sub>b</sub>) and its extension with
effect handlers λ<sub>h</sub><sup>→</sup>. We show that
λ<sub>h</sub><sup>→</sup> admits an asymptotically more efficient
implementation of generic count than any λ<sub>b</sub><sup>→</sup>
implementation.
### Conclusions
* Chapter 8 concludes and discusses future work.
### Appendices
* Appendix A contains a literature survey of continuations and
first-class control. I classify continuations according to their
operational behaviour and provide an overview of the various
first-class sequential control operators that appear in the
literature. The application spectrum of continuations is discussed
as well as implementation strategies for first-class control.
* Appendix B contains a proof that shows the `Get-get` equation for
state is redundant.
* Appendix C contains the proof details and gadgetry for the
complexity of the effectful generic count program.
* Appendix D provides a sample implementation of the Berger count
program and discusses it in more detail.
## Building
To build the dissertation you need the [Informatics thesis LaTeX
class](https://github.com/dhil/inf-thesis-latex-cls).
class](https://github.com/dhil/inf-thesis-latex-cls) with the
University of Edinburgh crests. Invoking `make` on the command line
ought to produce a PDF copy of the dissertation named `thesis.pdf`,
e.g.
Don't hold your breath... This thing isn't due for a while...
```shell
$ make
```
## Timeline
I submitted my thesis on May 30, 2021. It was examined on August 13,
2021, where I received pass with minor corrections. The revised thesis
was submitted on December 22, 2021. It was approved on March
14, 2022. The final revision was submitted on March 23, 2022. I
received my PhD award letter on March 24, 2022. My graduation
ceremony took place in McEwan Hall on July 11, 2022.

1469
code/ehop2022.links Normal file

File diff suppressed because it is too large Load Diff

1352
code/unix-huawei2022.links Normal file

File diff suppressed because it is too large Load Diff

1372
code/unix-msr2022.links Normal file

File diff suppressed because it is too large Load Diff

1352
code/unix-nuprl2022.links Normal file

File diff suppressed because it is too large Load Diff

1393
code/unix-tutorial.links Normal file

File diff suppressed because it is too large Load Diff

32
slides/Makefile Normal file
View File

@@ -0,0 +1,32 @@
TEXC=pdflatex
CFLAGS=-interaction=nonstopmode -halt-on-error -file-line-error
BIBC=bibtex
PAPER=viva
BIBLIO=$(PAPER)
LATEST_COMMIT=$(shell git log --format="%h" -n 1)
all: $(PAPER).pdf
draft: $(PAPER).pdf-draft
$(PAPER).aux: $(PAPER).tex
$(TEXC) $(CFLAGS) $(PAPER)
$(BIBLIO).bbl: $(PAPER).aux $(BIBLIO).bib
$(BIBC) $(PAPER)
$(PAPER).pdf: $(PAPER).aux $(BIBLIO).bbl
$(TEXC) $(CFLAGS) $(PAPER)
$(TEXC) $(CFLAGS) $(PAPER)
$(PAPER).pdf-draft: CFLAGS:=$(CFLAGS) "\def\DRAFT{$(LATEST_COMMIT)}\input{$(PAPER)}"
$(PAPER).pdf-draft: all
mv $(PAPER).pdf $(PAPER)-draft.pdf
tar cf thesis-draft.tar.gz $(PAPER)-draft.pdf
clean:
rm -f *.log *.aux *.toc *.out
rm -f *.bbl *.blg *.fls *.xml
rm -f *.nav *.snm
rm -f *.fdb_latexmk *.vtc *.cut
rm -f $(PAPER).pdf camera-ready.pdf submission.pdf
rm -f *.o *.cmx *.cmo

82
slides/viva.bib Normal file
View File

@@ -0,0 +1,82 @@
@inproceedings{HillerstromL16,
author = {Daniel Hillerstr{\"{o}}m and
Sam Lindley},
title = {Liberating effects with rows and handlers},
booktitle = {TyDe@ICFP},
pages = {15--27},
publisher = {{ACM}},
year = {2016}
}
@inproceedings{HillerstromLAS17,
author = {Daniel Hillerstr{\"{o}}m and
Sam Lindley and
Robert Atkey and
{KC} Sivaramakrishnan},
title = {Continuation Passing Style for Effect Handlers},
booktitle = {{FSCD}},
series = {LIPIcs},
volume = {84},
pages = {18:1--18:19},
OPTpublisher = {Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik},
year = {2017}
}
@inproceedings{HillerstromL18,
author = {Daniel Hillerstr{\"{o}}m and
Sam Lindley},
title = {Shallow Effect Handlers},
booktitle = {{APLAS}},
OPTseries = {Lecture Notes in Computer Science},
series = {{LNCS}},
volume = {11275},
pages = {415--435},
publisher = {Springer},
year = {2018}
}
@article{HillerstromLA20,
author = {Daniel Hillerstr{\"{o}}m and
Sam Lindley and
Robert Atkey},
title = {Effect handlers via generalised continuations},
journal = {J. Funct. Program.},
volume = {30},
pages = {e5},
year = {2020}
}
@article{HillerstromLL20,
author = {Daniel Hillerstr{\"{o}}m and
Sam Lindley and
John Longley},
title = {Effects for Efficiency: Asymptotic Speedup with First-Class Control},
journal = {Proc. {ACM} Program. Lang.},
volume = {4},
number = {{ICFP}},
pages = {100:1--100:29},
year = {2020}
}
# Unix
@article{RitchieT74,
author = {Dennis Ritchie and
Ken Thompson},
title = {The {UNIX} Time-Sharing System},
journal = {Commun. {ACM}},
volume = {17},
number = {7},
pages = {365--375},
year = {1974}
}
# CEK & C
@InProceedings{FelleisenF86,
title={Control Operators, the {SECD}-machine, and the $\lambda$-Calculus},
author={Felleisen, Matthias and Friedman, Daniel P.},
year=1987,
booktitle = {Formal Description of Programming Concepts III},
OPTbooktitle = {The Proceedings of the Conference on Formal Description of Programming Concepts III, Ebberup, Denmark},
pages = {193--217},
OPTpublisher={North Holland}
}

201
slides/viva.tex Normal file
View File

@@ -0,0 +1,201 @@
\documentclass[169,10pt,compress,dvipsnames]{beamer}
%%
%% Slides layout
%%
\beamertemplatenavigationsymbolsempty % hides navigation buttons
\usetheme{Madrid} % standard Madrid theme
\setbeamertemplate{footline}{} % renders the footer empty
%
\setbeamertemplate{bibliography item}{ % this is a hack to prevent Madrid theme + biblatex
\hspace{-0.4cm}\lower3pt\hbox{ % from causing bibliography entries to run over
\pgfuseimage{beamericonarticle} % the slide margins
}}
%%
%% Packages
%%
\usepackage[utf8]{inputenc} % enable UTF-8 compatible typing
\usepackage{hyperref} % interactive PDF
\usepackage[sort&compress,square,numbers]{natbib} % Bibliography
\usepackage{bibentry} % Print bibliography entries inline.
\makeatletter % Redefine bibentry to omit hyperrefs
\renewcommand\bibentry[1]{\nocite{#1}{\frenchspacing
\@nameuse{BR@r@#1\@extra@b@citeb}}}
\makeatother
\nobibliography* % use the bibliographic data from the standard BibTeX setup.
\usepackage{amsmath,amssymb,mathtools} % maths typesetting
\usepackage{../pkgs/mathpartir} % Inference rules
\usepackage{../pkgs/mathwidth} % renders character sequences nicely in math mode
\usepackage{stmaryrd} % semantic brackets
\usepackage{xspace} % proper spacing for macros in text
\usepackage[T1]{fontenc} % 8-bit font encoding
% native support for accented characters.
\usepackage[scaled=0.85]{beramono} % smoother typewriter font
\newcommand*{\Scale}[2][4]{\scalebox{#1}{\ensuremath{#2}}}%
\input{../macros.tex}
%%
%% Meta information
%%
\author{Daniel Hillerström}
\title{Foundations for Programming and Implementing Effect Handlers}
\institute{The University of Edinburgh, Scotland UK}
\subtitle{PhD viva}
\date{August 13, 2021}
%%
%% Slides
%%
\begin{document}
%
% Title slide
%
\begin{frame}
\maketitle
\end{frame}
% Dissertation overview
\begin{frame}
\frametitle{My dissertation at glance}
Three main strands of work
\begin{description}
\item[Programming] Language design and applications of effect handlers.
\item[Implementation] Canonical implementation strategies for effect handlers.
\item[Expressiveness] Exploration of the computational expressiveness of effect handlers.
\end{description}
\end{frame}
\begin{frame}
\frametitle{Calculi for deep, shallow, and parameterised handlers}
The calculi capture key aspects of the implementation of effect
handlers in Links.
\begin{itemize}
\item $\HCalc$ ordinary deep handlers (fold).
\item $\SCalc$ shallow handlers (case-split).
\item $\HPCalc$ parameterised deep handlers (fold+state).
\end{itemize}
The actual implementation is the union of the three calculi.\\[2em]
\textbf{Relevant papers} TyDe'16~\cite{HillerstromL16},
APLAS'18~\cite{HillerstromL18}, JFP'20~\cite{HillerstromLA20}.
\end{frame}
% UNIX
\begin{frame}
\frametitle{Effect handlers as composable operating systems}
An interpretation of \citeauthor{RitchieT74}'s
UNIX~\cite{RitchieT74} in terms of effect handlers.\\[2em]
\[
\bl
\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\textbf{Basic idea}
\ba[m]{@{\qquad}r@{~}c@{~}l}
\text{\emph{system call}} &\approx& \text{\emph{operation invocation}}\\
\text{\emph{system call implementation}} &\approx& \text{\emph{operation interpretation}}
\ea
\el
\]\hfill\\[2em]
\textbf{Key point} Legacy code is modularly retrofitted with functionality.
\end{frame}
% CPS translation
\begin{frame}
\frametitle{CPS transforms for effect handlers}
A higher-order CPS transform for effect handlers with generalised
continuations.\\[1em]
\textbf{Generalised continuation} Structured representation of
delimited continuations.\\[0.5em]
\[
\Scale[1.8]{\kappa = \overline{(\sigma, (\hret,\hops))}}
\]\\[1em]
\textbf{Key point} Separate the \emph{doing} layer ($\sigma$) from the \emph{being} layer ($H$).\\[2em]
\textbf{Relevant papers} FSCD'17~\cite{HillerstromLAS17},
APLAS'18~\cite{HillerstromL18}, JFP'20~\cite{HillerstromLA20}.
\end{frame}
% Abstract machine
\begin{frame}
\frametitle{Abstract machine semantics for effect handlers}
Plugging generalised continuations into \citeauthor{FelleisenF86}'s
CEK machine~\cite{FelleisenF86} yields a runtime for effect
handlers.\\[2em]
\[
\Scale[2]{\cek{C \mid E \mid K = \overline{(\sigma, (H,E))}}}
\]\\[2em]
\textbf{Relevant papers} TyDe'16~\cite{HillerstromL16},
JFP'20~\cite{HillerstromLA20}.
\end{frame}
% Interdefinability of handlers
\begin{frame}
\frametitle{Interdefinability of effect handlers}
Deep, shallow, and parameterised handlers are interdefinable
w.r.t. to typability-preserving macro-expressiveness.
\begin{itemize}
\item Deep as shallow, $\mathcal{D}\llbracket - \rrbracket$, image is computationally lightweight.
\item Shallow as deep, $\mathcal{S}\llbracket - \rrbracket$, image is computationally expensive.
\item Parameterised as deep, $\mathcal{P}\llbracket - \rrbracket$,
image uses explicit state-passing.
\end{itemize}
~\\[1em]
\textbf{Relevant papers} APLAS'18~\cite{HillerstromL18},
JFP'20~\cite{HillerstromLA20}.
\end{frame}
% Asymptotic speed up with first-class control
\begin{frame}
\frametitle{Asymptotic speed up with effect handlers}
Effect handlers can make some programs faster!
\[
\Count_n : ((\Nat_n \to \Bool) \to \Bool) \to \Nat
\]\\[1em]
%
Using type-respecting expressiveness
\begin{itemize}
\item There \textbf{exists} an implementation of $\Count_n \in \HPCF$ with
effect handlers such that the runtime for every $n$-standard predicate $P$ is
$\Count_n~P = \BigO(2^n)$.
\item \textbf{Forall} implementations of $\Count_n \in \BPCF$ the runtime for every $n$-standard predicate $P$ is $\Count_n~P = \Omega(n2^n)$
\end{itemize}
~\\[1em]
\textbf{Relevant paper} ICFP'20~\cite{HillerstromLL20}.
\end{frame}
% Background
% \begin{frame}
% \frametitle{Continuations literature review}
% \end{frame}
%
% References
%
\begin{frame}%[allowframebreaks]
\frametitle{References}
\bibliographystyle{plainnat}
\bibliography{\jobname}
\end{frame}
\end{document}

View File

@@ -19,6 +19,15 @@
type = {{MSc(R)} thesis}
}
# UNIX with effect handlers abstract
@misc{Hillerstrom21,
author = {Daniel Hillerström},
title = {Composing {UNIX} with {Effect} {Handlers}: {A} {Case} {Study} in {Effect} {Handler} {Oriented} {Programming} (Extended Abstract)},
year = {2021},
optmonth = sep,
howpublished = {{ML Workshop}}
}
# OCaml handlers
@article{SivaramakrishnanDWKJM21,
author = {{KC} Sivaramakrishnan and
@@ -1249,7 +1258,7 @@
@techreport{Remy93,
title = {{Syntactic theories and the algebra of record terms}},
author = {Didier Remy},
author = {Didier R\'{e}my},
number = {RR-1869},
institution = {{INRIA}},
year = {1993},
@@ -2392,7 +2401,8 @@
author = {Nikolaos S. Papspyrou},
title = {A resumption monad transformer and its applications in the semantics of concurrency},
booktitle = {Proceedings of the 3rd Panhellenic Logic Symposium},
address = {Anogia, Greece}
address = {Anogia, Greece},
year = 2001,
}
@inproceedings{Harrison06,
@@ -3775,3 +3785,19 @@
pages = {1--22},
year = {1977}
}
# Dagstuhl seminar report
@article{AhmanALR21,
author = {Danel Ahman and
Amal Ahmed and
Sam Lindley and
Andreas Rossberg},
title = {{Scalable} {Handling} of {Effects} ({Dagstuhl} {Seminar} 21292)},
journal = {Dagstuhl Reports},
volume = {11},
number = {6},
pages = {54--81},
year = {2021}
}

14695
thesis.tex

File diff suppressed because it is too large Load Diff