+\section{Interpretations}
+The nature of the \gls{MTASK} \gls{DSL} embedding allows for multiple interpretations of the terms in the language.
+The \gls{MTASK} language has interpretations to pretty print, simulate, and generate byte code for terms in the language.
+There are many other interpretations possible such as static analyses or optimisation.
+Not all these interpretations are necessarily \gls{TOP} engines, i.e.\ not all the interpretations execute the resulting tasks.
+
+\subsection{Pretty printer}
+The pretty printer interpretation converts an \gls{MTASK} term to a string representation.
+As the host language \gls{CLEAN} constructs the \gls{MTASK} expressions at run time, it can be useful to show the constructed expression at run time as well.
+The only function exposed for this interpretation is the \cleaninline{showMain} function (\cref{lst:showmain}).
+It runs the pretty printer and returns a list of strings containing the pretty printed result.
+The pretty printing function does the best it can but obviously cannot reproduce layout, curried functions, and variable names.
+This shortcoming is illustrated by printing a blink task that contains a function and currying in \cref{lst:showexample}.
+The output of this action would be \cleaninline{fun f0 a1 = writeD(D13, a1) >>= \\a2.(delay 1000) >>\| (f0 (Not a1)) in (f0 True)}
+
+\begin{lstClean}[caption={The entry point for the pretty printing interpretation.},label={lst:showmain}]
+:: Show a // from the mTask pretty printing library
+showMain :: (Main (Show a)) -> [String]
+\end{lstClean}
+
+\begin{lstClean}[caption={Pretty printing interpretation example.},label={lst:showexample}]
+blinkTask :: Main (MTask v Bool) | mtask v
+blinkTask =
+ fun \blink=(\state->
+ writeD d13 state >>|. delay (lit 500) >>=. blink o Not
+ ) In {main = blink true}
+\end{lstClean}
+
+\subsection{Simulator}
+In a real microprocessor, it is hard to observe the state and to control the sensors in such a way that the behaviour of interest can be observed.
+The simulator converts the expression to a ready-for-work \gls{ITASK} simulation to bridge this gap.
+There is one entry point for this interpretation (see \cref{lst:simulatemain}).
+The task resulting from the \cleaninline{simulate} function presents the user with an interactive simulation environment (see \cref{fig:sim}).
+The simulation allows the user to (partially) execute tasks, control the simulated peripherals, inspect the internal state of the tasks, and interact with \glspl{SDS}.
+
+\begin{lstClean}[caption={The entry point for the simulation interpretation.},label={lst:simulatemain}]
+:: TraceTask a // from the mTask simulator library
+simulate :: (Main (TraceTask a)) -> [String]
+\end{lstClean}
+
+\begin{figure}
+ \centering
+ \includegraphics[width=\linewidth]{simg}
+ \caption{Simulator interface for a blink program written in \gls{MTASK}.}\label{fig:sim}
+\end{figure}
+
+\subsection{Byte code compiler}
+The main interpretation of the \gls{MTASK} system is the byte code compiler (\cleaninline{:: BCInterpret a}).
+This interpretation compiles the \gls{MTASK} term at run time to byte code.
+With it, and a handful of integration functions, \gls{MTASK} tasks can be executed on microcontrollers and integrated in \gls{ITASK} as if they were regular \gls{ITASK} tasks.
+Furthermore, with a special language construct, \glspl{SDS} can be shared between \gls{MTASK} and \gls{ITASK} programs as well.
+The integration with \gls{ITASK} is explained thoroughly later in \cref{chp:integration_with_itask}.
+
+The \gls{MTASK} language together with \gls{ITASK} is a heterogeneous \gls{DSL}.
+I.e.\ some components---for example the \gls{RTS} on the microcontroller that executes the tasks---is largely unaware of the other components in the system, and it is executed on a completely different architecture.
+The \gls{MTASK} language is a \gls{TOP} language with basic tasks tailored for \gls{IOT} edge devices (see \cref{sec:top}).
+It uses expressions based a simply-typed $\lambda$-calculus with support for some basic types, arithmetic operations, and function definitions.
+