X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;ds=sidebyside;f=methods.mtask.tex;h=d6fcbb329f6a4bfd82cbb416f104c914209a53b6;hb=6863f12d2bffba5c1f4c6c7756a5ee641816ce11;hp=4e61d97642d598f3222e46346b2abce7daf0ab91;hpb=c7fa2f10a5c049e2ae70405630857c7873778899;p=msc-thesis1617.git diff --git a/methods.mtask.tex b/methods.mtask.tex index 4e61d97..d6fcbb3 100644 --- a/methods.mtask.tex +++ b/methods.mtask.tex @@ -2,7 +2,7 @@ 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} was designed to generate a ready-to-compile \gls{TOP}-like system for -microcontrollers such as the \gls{Arduino}\cite{koopman_type-safe_nodate}% +microcontrollers such as the \gls{Arduino}~\cite{koopman_type-safe_nodate}% \cite{plasmeijer_shallow_2016}. The \gls{mTask}-\gls{EDSL} is a shallowly embedded class based \gls{EDSL} and @@ -62,15 +62,15 @@ class boolExpr v where \section{Control flow} Looping of \glspl{Task} happens because \glspl{Task} are executed after waiting -a specified amount of time or when they are launched by another task or even -themselves. Therefore there is no need for loop control flow functionality such -as \emph{while} or \emph{for} constructions. The main control flow operators -are the sequence operator and the \emph{if} statement. Both are shown in -Listing~\ref{lst:control}. The first class of \emph{If} statements describes +a specified amount of time or when they are launched by another \gls{Task} or +even themselves. Therefore there is no need for loop control flow functionality +such as \emph{while} or \emph{for} constructions. The main control flow +operators are the sequence operator and the \emph{if} statement. Both are shown +in Listing~\ref{lst:control}. The first class of \emph{If} statements describes the regular \emph{if} statement. The expressions given can have any role. The -functional dependency on \CI{s} determines the return type of the -statement. The listing includes examples of implementations that illustrate -this dependency. +functional dependency on \CI{s} determines the return type of the statement. +The listing includes examples of implementations that illustrate this +dependency. The sequence operator is very straightforward and its only function is to tie the together in sequence. @@ -182,11 +182,11 @@ similar fashion as the \texttt{sds} class. This class is listed in Listing~\ref{lst:taskclass}. \glspl{Task} can have an argument and always have to specify a delay or waiting time. The type signature of the \CI{mtask} is complex and therefore an example is given. The aforementioned Listing -shows a simple specification containing one task that increments a value +shows a simple specification containing one \gls{Task} that increments a value indefinitely every one seconds. \begin{lstlisting}[label={lst:taskclass},% - caption={The classes for defining tasks}] + caption={The classes for defining \glspl{Task}}] class mtask v a where task :: (((v delay r) a->v MTask Expr)->In (a->v u p) (Main (v t q))) -> Main (v t q) | ...