+\begin{lstClean}[numbers=left,caption={The \gls{UI} and code for entering a person in \gls{ITASK}.},label={lst:enter_person}]
+:: Person = { name :: String, gender :: Gender, dateOfBirth :: Date }[+\label{lst:dt_fro}+]
+:: Gender = Male | Female | Other String[+\label{lst:dt_to}+]
+
+derive class iTask Person, Gender[+\label{lst:dt_derive}+]
+
+enterPerson :: Task Person
+enterPerson
+ = Hint "Enter a person:" @>> enterInformation [][+\label{lst:task_ui}+]
+ >>! \result->Hint "You Entered:" @>> viewInformation [] result[+\label{lst:task_comb}+]
+\end{lstClean}
+
+\subsection{\texorpdfstring{\Gls{MTASK}}{MTask}}
+This thesis uses \gls{ITASK} in conjunction with \gls{MTASK}, an innovative \gls{TOP} language designed for defining interactive systems for \gls{IOT} edge devices \citep{koopman_task-based_2018}.
+Where \gls{ITASK} abstracts away from details such as user interfaces, data storage, and persistent workflows, \gls{MTASK} offers abstractions for edge layer-specific details such as the heterogeneity of architectures, platforms and frameworks; peripheral access; multitasking; task scheduling; and energy consumption.
+It is written in \gls{CLEAN} as a multi-view \gls{EDSL} and hence there are multiple interpretations of the language of which the byte code compiler is the most relevant for this thesis.
+From the terms in the \gls{TOP} language, a very compact binary representation of the work that needs to be done is compiled.
+This specification is then sent to a device that runs the \gls{MTASK} \gls{RTS}, a domain-specific \gls{TOP} engine implemented as a feather-light domain-specific \gls{OS}.
+\Gls{MTASK} is seamlessly integrated with \gls{ITASK}, it allows the programmer to define all layers of an \gls{IOT} system from a single declarative specification.
+
+\todo[inline]{Is this example useful? I think it's too technical}
+\Cref{lst:intro_blink} shows an interactive \gls{MTASK}\slash{}\gls{ITASK} application for blinking \pgls{LED} on the microcontroller every user-specified interval.
+\Crefrange{lst:intro:itask_fro}{lst:intro:itask_to} show the \gls{ITASK} part.
+First a \gls{SDS} is defined to communicate the blinking interval, then the \gls{MTASK} is connected using \cleaninline{withDevice}.
+Once connected, the \cleaninline{intBlink} task is sent to the device (\cref{lst:intro_liftmtask}) and in parallel, the value of the interval \gls{SDS} can be updated using an editor (\cref{lst:intro_editor}).
+The \cleaninline{intBlink} task (\crefrange{lst:intro:mtask_fro}{lst:intro:mtask_to}) is the \gls{MTASK} part of the application that has its own tasks, \glspl{SDS}, and \gls{UOD}.
+This task first defines \gls{GPIO} pin 13 to be of the output type (\cref{lst:intro:declarePin}) followed by lifting the \gls{ITASK} \gls{SDS} to an \gls{MTASK} \gls{SDS} (\cref{lst:intro:liftsds}).
+The main expression of the program calls the \cleaninline{blink} function with the initial state.
+This function on \crefrange{lst:intro:blink_fro}{lst:intro:blink_to} first reads the interval \gls{SDS}, waits the specified delay, writes the state to the \gls{GPIO} pin and calls itself recursively using the inverse of the state.
+
+\begin{lstClean}[numbers=left,caption={\Gls{MTASK}\slash{}\gls{ITASK} interactive blinking.},label={lst:intro_blink}]
+interactiveBlink :: Task Int[+\label{lst:intro:itask_fro}+]
+interactiveBlink =
+ withShared 500 \iInterval->[+\label{lst:intro_withshared}+]
+ withDevice {TCPSettings | host = ..., port = ...} \dev->
+ liftmTask (intBlink iInterval) dev[+\label{lst:intro_liftmtask}+]
+ -|| Hint "Interval (ms)" @>> updateSharedInformation [] iInterval[+\label{lst:intro_editor}+][+\label{lst:intro:itask_to}+]
+
+intBlink :: Shared sds Int -> MTask v Int | mtask, liftsds v & RWShared sds[+\label{lst:intro:mtask_fro}+]
+intBlink iInterval =
+ declarePin D13 PMOutput \d13->[+\label{lst:intro:declarePin}+]
+ liftsds \mInterval=iInterval[+\label{lst:intro:liftsds}+]
+ In fun \blink=(\st->[+\label{lst:intro:blink_fro}+]
+ getSds mInterval >>=. \i->delay i
+ >>|. writeD d13 st >>|. blink (Not st))[+\label{lst:intro:blink_to}+]
+ In {main = blink true}[+\label{lst:intro:mtask_to}+]
+\end{lstClean}
+
+\subsection{Other \texorpdfstring{\glsxtrshort{TOP}}{TOP} languages}
+While \gls{ITASK} conceived \gls{TOP}, it is not the only \gls{TOP} language and engine.
+Some \gls{TOP} languages and systems arose from Master's and Bachelor's thesis projects (e.g.\ \textmu{}Task \citep{piers_task-oriented_2016} and LTasks \citep{van_gemert_task_2022}) or were created to solve a practical problem (e.g.\ Toppyt \citep{lijnse_toppyt_2022} and hTask \citep{lubbers_htask_2022}).
+Furthermore, \gls{TOPHAT} is a fully formally specified \gls{TOP} language designed to capture the essence of \gls{TOP} formally \citep{steenvoorden_tophat_2019}.
+It is also possible to translate \gls{TOPHAT} code to \gls{ITASK} to piggyback on the \gls{TOP} engine it offers \citep[\citesection{G.3}]{steenvoorden_tophat_2022}.
+
+\section{Contributions}\label{sec:contributions}
+This section provides a thorough overview of the relation to publications and the scientific contributions of the episodes and chapters.
+
+\subsection{\Fullref{prt:dsl}}
+The \gls{MTASK} system is a heterogeneous \gls{EDSL} and during the development of it, several novel basal techniques for embedding \glspl{DSL} in \gls{FP} languages have been found.
+This episode is a paper based episodes on these techniques.
+
+\Cref{chp:classy_deep_embedding} is based on the paper \emph{Deep Embedding with Class} \citep{lubbers_deep_2022}.