-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tex
172 lines (134 loc) · 4.72 KB
/
main.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
\documentclass[%
12pt,
bibliography=toc,
listof=leveldown,% use section for the list headings
oneside
]{book}
\usepackage[subpreambles=true]{standalone}
\usepackage[margin=2cm]{geometry}
\usepackage[table]{xcolor}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{listings}
\usepackage[toc,page]{appendix}
\usepackage{tikz}
\usepackage[absolute,overlay]{textpos}
\usepackage{etoolbox}
\usepackage{pdfpages}
\usepackage{tabularx}
\usepackage{hyperref}
\usepackage{import}
\usepackage{amsmath}
\usepackage{cleveref}
\usepackage[nottoc]{tocbibind}
% Chapter formatting
\usepackage{titlesec, blindtext, color}
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{\textbar}\hsp}{0pt}{\Huge\bfseries}
\titlespacing*{\chapter}{0pt}{-40pt}{30pt}
\input{./src/macros.tex}
\input{./src/listing.tex}
\begin{document}
\input titlepage
\frontmatter
\section*{Declaration of Originality}
I, Géza Csenger of Homerton College, being a candidate for Part II of the
Computer Science Tripos, hereby declare that this dissertation and the work
described in it are my own work, unaided except as may be specified below, and
that the dissertation does not contain material that has already been used to
any substantial extent for a comparable purpose.\\
\noindent
I, Géza Csenger of Homerton College,
am content for my dissertation to be made available to the students and staff
of the University.
\vspace{1cm}
\textbf{Signed}
\vspace{1cm}
\textbf{Date}
\vspace{3cm}
\section*{Acknowledgements}
Hereby, I would like to say thanks to:
\begin{itemize}
\item My project supervisor, \textbf{Prof.\ Alan Mycroft}, for his support
and guidance
\item My Director of Studies, \textbf{Dr John Fawcett}, for a \emph{lot} of
things
\item Special thanks goes to Lili Janzer for proofreading this work as an \emph{actual} Part IB student
\item Friends and family without whom completing this work would have been impossible
\end{itemize}
\newpage
\chapter{Proforma}
\begin{tabularx}{\textwidth}{@{} ll @{}}
Candidate number & 2375C \\
Project title & Compiling algebraic effect handlers \\
Examination & Computer Science Tripos -- Part II, 2020 \\
Word Count & 11033%
\footnote{Obtained using \url{https://app.uio.no/ifi/texcount/}} \\
Lines of Code & 6158%
\footnote{Obtained using Visual Studio Code's \href{https://marketplace.visualstudio.com/items?itemName=uctakeoff.vscode-counter}{VS Code Counter} extension} \\
Page Count & 40 \\
Project Originator & The author \\
Supervisor & Professor Alan Mycroft \\
\end{tabularx}
\paragraph{Original aims of the Project}
The project had four core aims: to write an interpreter for Eff, to design a
bytecode for Eff, to write a compiler from Eff to this bytecode and to
implement a virtual machine interpreting the bytecode. Additional goals were
to implement various optimisations for Eff, such as tail resumption optimisation
or minimising the copy overhead from the use of continuations.
\paragraph{Work completed}
A syntax-level Eff interpreter was implemented. A bytecode for Eff (SHADEcode)
was designed. A compiler from Eff to SHADEcode was implemented as well as a
virtual machine (SHADE) interpreting SHADEcode. As far as I know, SHADE and
SHADEcode are the first virtual machine and bytecode designed
\emph{specifically} for Eff. In the Evaluation chapter I compare the performance
of my Eff interpreter with the current official Eff interpreter and the
performance of the SHADE virtual machine with the performance of Multicore
OCaml (another compiled language with similar features to Eff).
\paragraph{Special difficulties}
None.
\tableofcontents
\newpage
\listoffigures
\listoftables
\lstlistoflistings
\mainmatter
\chapter{Introduction}
\import{sections/}{introduction}
\chapter{Preparation}
\import{sections/}{preparation}
\chapter{Implementation}
\import{sections/}{implementation}
\chapter{Evaluation}
\import{sections/}{evaluation}
\chapter{Conclusion}
\import{sections/}{conclusion}
\bibliography{bibliography}{}
\bibliographystyle{plain}
\appendix
\begin{appendices}
\renewcommand{\thepage}{\thechapter.\arabic{page}}
\chapter{Theory}
\label{app:theory}
\setcounter{page}{1}
\import{sections/}{theory}
\chapter{Code snippets}
\label{code-snippets}
\setcounter{page}{1}
\import{sections/}{code_snippets}
\chapter{Software Engineering}
\label{app:softeng}
\setcounter{page}{1}
\import{sections/}{softeng}
\chapter{Measurement results}
\label{raw-data}
\setcounter{page}{1}
\import{sections/}{measurement}
\chapter{Project Proposal}
\label{project-proposal}
\setcounter{page}{1}
The project proposal starts on the next page.
\includepdf[pages=-]{sections/proposal.pdf}
\end{appendices}
\end{document}