From: Mart Lubbers Date: Mon, 26 Jun 2017 11:28:41 +0000 (+0200) Subject: Camil's comments: chapter 2-4 X-Git-Tag: hand-in~44 X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=394d87dbaa6aa6cce84fc8080233f81b61417f7f;p=msc-thesis1617.git Camil's comments: chapter 2-4 --- diff --git a/img/manage.png b/img/manage.png index e73071f..aae3f8c 100644 Binary files a/img/manage.png and b/img/manage.png differ diff --git a/methods.mtask.tex b/methods.mtask.tex index 3ef01f1..d8d9fdf 100644 --- a/methods.mtask.tex +++ b/methods.mtask.tex @@ -1,5 +1,5 @@ -The \gls{mTask}-\gls{EDSL} is the language used in the system. The -\gls{mTask}-\gls{EDSL} was created by Koopman et al.\ and supported several +The \gls{mTask}-\gls{EDSL} is the language used for the proposed system. The +\gls{mTask}-\gls{EDSL} was created by Koopman et al.\ and supports 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 program for microcontrollers such as the \gls{Arduino}~\cite{koopman_type-safe_nodate}% @@ -12,18 +12,18 @@ is 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. -A view for the \gls{mTask}-\gls{EDSL} is a type with kind \CI{*->*->*}% -\footnote{A type with two free type variables.} that implements some of the -classes given. The types do not have to be present as fields in the higher -kinded view and can, and will most often, be exclusively phantom types. Thus, -views are of the form: \CI{:: v t r = ...}. The first type variable will be -the type of the view. The second type variable will be the type of the -\gls{EDSL}-expression and the third type variable represents the role of the -expression. Currently the role of the expressions form a hierarchy. The three -roles and their hierarchy are shown in Listing~\ref{lst:exprhier}. This implies -that everything is a statement, only a \CI{Upd} and a \CI{Expr} are -expressions. The \CI{Upd} restriction describes updatable expressions such as -\gls{GPIO} pins and \glspl{SDS}. +A view for the \gls{mTask}-\gls{EDSL} is a type with two free type +variables\footnote{kind \CI{*->*->*}.} that implements some of the classes +given. The types do not have to be present as fields in the higher kinded view +and can, and will most often, be exclusively phantom types. Thus, views are of +the form:\\\CI{:: v t r = ...}. The first type variable will be the type of the +view. The second type variable will be the type of the \gls{EDSL}-expression +and the third type variable represents the role of the expression. Currently +the role of the expressions form a hierarchy. The three roles and their +hierarchy are shown in Listing~\ref{lst:exprhier}. This implies that everything +is a statement, only a \CI{Upd} and a \CI{Expr} are expressions. The \CI{Upd} +restriction describes updatable expressions such as \gls{GPIO} pins and +\glspl{SDS}. \begin{lstlisting}[% label={lst:exprhier},caption={Expression role hierarchy}] @@ -122,8 +122,8 @@ class assign v where (=.) infixr 2 :: (v t Upd) (v t p) -> v t Expr | ... \end{lstlisting} -A way of storing data in \glspl{mTask} is using \glspl{SDS}. \glspl{SDS} serve -as variables in \gls{mTask} and maintain their value across executions. +One way of storing data in \glspl{mTask} is using \glspl{SDS}. \glspl{SDS} +serve as variables in \gls{mTask} and maintain their value across executions. \glspl{SDS} can be used by multiple \glspl{Task} and can be used to share data. The classes associated with \glspl{SDS} are listed in Listing~\ref{lst:sdsclass}. The \CI{Main} type is introduced to box an @@ -143,11 +143,11 @@ class sds v where The \gls{C}-backend of the \gls{mTask}-system has an engine that is generated alongside the code for the \glspl{Task}. This engine will execute the \glspl{mTask} according to certain rules and semantics. -\glspl{mTask} do not behave like functions but more like +\gls{mTask}-\glspl{Task} do not behave like functions but more like \gls{iTasks}-\glspl{Task}. An \gls{mTask} is queued when either its timer runs out or when it is launched by another \gls{mTask}. When an \gls{mTask} is -queued it does not block the execution and it will return immediately while -the actual \gls{Task} will be executed anytime in the future. +queued it does not block the execution and it will return immediately while the +actual \gls{Task} will be executed anytime in the future. The \gls{iTasks}-backend simulates the \gls{C}-backend and thus uses the same semantics. This engine expressed in pseudocode is listed as @@ -202,9 +202,9 @@ count = task \count = (\n.count (lit 1000) (n +. One)) In {main = count (lit 100 Some example \glspl{mTask} using almost all of their functionality are shown in Listing~\ref{lst:exmtask}. The \glspl{mTask} shown in the example do not belong to a particular view and therefore are of the type \CI{View t r}. The -\CI{blink} \gls{mTask} show the classic \gls{Arduino} \emph{Hello World!} -application that blinks a certain \gls{LED} every second. The \CI{thermostat} -expression will enable a digital pin powering a cooling fan when the analog pin +\CI{blink} \gls{mTask} show the classic \gls{Arduino} blinking led application +that blinks a certain \gls{LED} every second. The \CI{thermostat} expression +will enable a digital pin powering a cooling fan when the analog pin representing a temperature sensor is too high. \CI{thermostat`} shows the same expression but now using the assignment style \gls{GPIO} technique. The \CI{thermostat} example also shows that it is not necessary to run everything diff --git a/results.arch.tex b/results.arch.tex index e1773d4..6b67064 100644 --- a/results.arch.tex +++ b/results.arch.tex @@ -582,7 +582,6 @@ variables. All example \glspl{mTask} are of the type \CI{Task (Main (ByteCode the devices can be created and modified. Moreover, this panel allows the user to reconnect with a device after a restart of the server application. -\todo{redo this image} \begin{figure}[H] \centering \includegraphics[width=\linewidth]{manage} diff --git a/thesis.tex b/thesis.tex index 782e142..757f23f 100644 --- a/thesis.tex +++ b/thesis.tex @@ -1,6 +1,7 @@ %&thesis \usepackage[nonumberlist]{glossaries} % Glossaries and acronyms \usepackage[algochapter]{algorithm2e} % Pseudocode +\renewcommand\AlCapFnt{\normalfont} \makeglossaries% \input{glossaries}