-\section{mTask}
The \gls{mTask}-\gls{EDSL} is the basis on which the system is built. The
\gls{mTask}-\gls{EDSL} was created by Koopman et al.\ to support several views
such as an \gls{iTasks} simulation and a \gls{C}-code generator. The \gls{EDSL}
The \gls{mTask}-\gls{EDSL} is a shallowly embedded class based \gls{EDSL} and
therefore it is very suitable to have a new backend that partly implements the
-given classes. The following subsections show the details of the \gls{EDSL}
+given classes. The following sections show the details of the \gls{EDSL}
that are used in this extension. The parts of the \gls{EDSL} that are not used
will not be discussed and the details of those parts can be found in the cited
literature.
instance isExpr Expr
\end{lstlisting}
-\subsection{Semantics}
+\section{Semantics}
\gls{mTask} do not behave like functions but more like
\gls{iTasks}-\glspl{Task}. When an \gls{mTask} is created it returns immediatly
and the \gls{Task} will be executed sometime in the future. \glspl{Task} can
run at an interval and they can start other tasks.
\todo{Meer uitwijden over de mTask semantiek}
-\subsection{Expressions}
+\section{Expressions}
Expressions in the \gls{mTask}-\gls{EDSL} are divided into two types, namely
boolean expressions and arithmetic expressions. The class of arithmetic
language constructs also contains the function \CI{lit} that lifts a
(==.) infix 4 :: (v a p) (v a q) -> v Bool Expr | ==, toCode a & ...
\end{lstlisting}
-\subsection{Control flow}
+\section{Control flow}
Looping of \glspl{Task} happens because \glspl{Task} are launched at regular
intervals or relaunch themselves. Therefore there is no need for loop control
flow functionality such as \CI{While} or \CI{For} constructions. The main
(:.) infixr 0 :: (v t p) (v u q) -> v u Stmt | ...
\end{lstlisting}
-\subsection{Input/Output and class extensions}
+\section{Input/Output and class extensions}
All expressions that have an \CI{Upd} role can be assigned to. Examples of such
expressions are \glspl{SDS} and \gls{GPIO}. Moreover, class extensions can be
created for specific peripherals such as user LEDs. The classes facilitating
sds :: ((v t Upd)->In t (Main (v c s))) -> (Main (v c s)) | ...
\end{lstlisting}
-\subsection{Example \gls{mTask}}
+\section{Example mTask}
\todo{Also explain semantics about running tasks}
Some example \glspl{mTask} using almost all of the functionality are show in
Listing~\ref{lst:exmtask}. The \glspl{mTask} shown in the example do not belong