+%\begin{figure}[ht]
+% \centering
+% \includegraphics[width=.4\linewidth]{esp}
+% \caption{A typical ESP32 microcontroller prototyping board.}%
+% \label{fig:esp_prototype}
+%\end{figure}
+
+Programming and maintaining \gls{IOT} systems is a complex and error-prone process.
+An \gls{IOT} programmer has to program each device and their interoperation using different programming paradigms, programming languages, and abstraction levels resulting in semantic friction.
+
+This thesis describes the research carried out around taming these complex \gls{IOT} systems using \gls{TOP}.
+\Gls{TOP} is an innovative tierless programming paradigm for interactive multi-tier systems.
+By utilising advanced compiler technologies, much of the internals, communication, and interoperation of the applications is automatically generated.
+From a single declarative specification of the work that needs to be done, the compiler makes a ready-for-work application.
+For example, the \gls{TOP} system \gls{ITASK} can be used to program all layers of a multi-user distributed web applications from a single source specification.
+Unfortunately, because the abstraction level is so high, the hardware requirements are too excessive for such systems to be suitable for the average \gls{IOT} edge device.
+
+This is where \glspl{DSL} are brought into play.
+\Glspl{DSL} are programming languages created with a specific domain in mind.
+Consequently, jargon does not have to be expressed in the language itself, but they can be built-in features.
+As a result, the hardware requirements can be drastically lower, even with high levels of abstraction for the specified domain.
+
+To bridge the gap between the \gls{IOT} edge devices, the \gls{MTASK} \gls{DSL} is used.
+\Gls{MTASK} is a novel programming language for programming \gls{IOT} edge devices using \gls{TOP}.
+As it is integrated with \gls{ITASK}, it allows for all layers of an \gls{IOT} application to be programmed from a single source.
+\todo{Kan deze \P\ weg? Aan\-ge\-zien het ook al in de volgende sectie staat}
+
+\section{Reading guide}%
+\label{lst:reading_guide}
+The thesis is structured as a purely functional rhapsody.
+On Wikipedia, a musical rhapsody is defined as follows \citep{wikipedia_contributors_rhapsody_2022}:
+\begin{quote}\emph{%
+ A \emph{rhapsody} in music is a one-movement work that is episodic yet integrated, free-flowing in structure, featuring a range of highly contrasted moods, colour, and tonality.}
+\end{quote}
+%The three episodes in this thesis are barded by the introduction and conclusion (\cref{chp:introduction,chp:conclusion}).
+\Cref{prt:dsl} is a paper-based---otherwise known as cumulative---episode providing insights in advanced \gls{DSL} embedding techniques for \gls{FP} languages.
+The chapters are readable independently.
+\Cref{prt:top} is a monograph showing \gls{MTASK}, a \gls{TOP} \gls{DSL} for the \gls{IOT}.
+Hence, the chapters are best read in order.
+\Cref{prt:tvt} is a journal article in which traditional tiered \gls{IOT} programming is qualitatively and quantitatively compared to tierless programming using a real-world application.
+The chapter is readable independently.
+
+The following sections provide background material on the \gls{IOT}, \glspl{DSL}, and \gls{TOP} after which a detailed overview of the contributions is presented.
+Text typeset as \texttt{teletype} represents source code.
+Standalone source code listings are marked by the programming language used, e.g.\ \gls{CLEAN}\footnotemark, \gls{HASKELL}, \gls{CPP}, \etc.
+\footnotetext{\Cref{chp:clean_for_haskell_programmers} contains a guide for \gls{CLEAN} tailored to \gls{HASKELL} programmers.}
+
+\section{\texorpdfstring{\Glsxtrlong{IOT}}{Internet of things}}%
+\label{sec:back_iot}